<link rel="stylesheet" href="../plugins/bootstrap/css/bootstrap.min.css">
<link rel="stylesheet" href="../plugins/font-awesome/css/font-awesome.min.css">
<link rel="stylesheet" href="../plugins/adminLTE/css/AdminLTE.css">
<link rel="stylesheet" href="../plugins/adminLTE/css/skins/_all-skins.min.css">
<link rel="stylesheet" href="../css/style.css">
<script src="../plugins/jQuery/jquery-2.2.3.min.js"></script>
<script src="../plugins/bootstrap/js/bootstrap.min.js"></script>
<script src="../plugins/angularjs/angular.min.js"></script>
<!-- 分页组件 -->
<script src="../plugins/angularjs/pagination.js"></script>
<link rel="stylesheet" href="../plugins/angularjs/pagination.css" >

<!-- kindeditor插件 -->
<link href="/js/kindeditor-4.1.10/themes/default/default.css" type="text/css" rel="stylesheet">
<script type="text/javascript" charset="utf-8" src="../js/kindeditor-4.1.10/kindeditor-all-min.js"></script>
<script type="text/javascript" charset="utf-8" src="../js/kindeditor-4.1.10/lang/zh_CN.js"></script>
<script src="../js/common.js"></script>

<!-- 画廊插件 -->
<link rel="stylesheet" href="../plugins/baguetteBox/css/baguetteBox.min.css">
<link rel="stylesheet" href="../plugins/baguetteBox/css/gallery-clean.css">
<script type="text/javascript" src="../plugins/baguetteBox/js/baguetteBox.min.js"></script>
<script type="text/javascript" src="../plugins/baguetteBox/js/angular-baguetteBox.js"></script>


<script src="../js/base_pagination.js"></script>
<script src="../js/service/photoService.js"></script>
<script src="../js/controller/photoController.js"></script>
<script>


    //页面初始化完毕后执行此方法
    $(function(){

        //初始化类目选择和图片上传器
        Blog.init({fun:function(node){
            }});

        baguetteBox.run('.table-box');
    });
</script>


<body class="hold-transition skin-red sidebar-mini" ng-app="photoApp" ng-controller="photoController" >
<!-- .box-body -->
<div class="box-header with-border">
    <h3 class="box-title">相册列表</h3>
</div>

<div class="box-body">

    <!-- 数据表格 -->
    <div class="table-box ">

        <!--工具栏-->
        <div class="pull-left">
            <div class="form-group form-inline">
                <div class="btn-group">
                    <a class="btn btn-default"  ng-click="selectAll()"><input style="margin: 0;display: none"  ng-model="master" type="checkbox" ><i class="fa fa-check"></i>全选</a>
                    <button type="button" class="btn btn-default" title="新建" data-toggle="modal" data-target="#addModal" ng-click="entity={}"><i class="fa fa-file-o"></i> 新建</button>
                    <button type="button" class="btn btn-default" title="删除" data-toggle="modal" data-target="#delModal" ><i class="fa fa-trash-o"></i> 删除</button>
                    <button type="button" class="btn btn-default" title="刷新" onclick="window.location.reload();"><i class="fa fa-refresh"></i> 刷新</button>
                </div>
            </div>
        </div>
        <div class="box-tools pull-right">
            <div class="has-feedback">

            </div>
        </div>
        <!--工具栏/-->

        <div class="row " style="clear:both">
            <!-- ngRepeat: entity in list --><div class="col-sm-6 col-md-2 col-xs-12  ng-scope"  >
            <div class="thumbnail">
                <a ng-href="http://119.29.130.199/www/images/2019/05/27/1558960171336120.jpg" href="http://119.29.130.199/www/images/2019/05/27/1558960171336120.jpg"><img style="height:200px;width:100%" ng-src="http://119.29.130.199/www/images/2019/05/27/1558960171336120.jpg" src="http://119.29.130.199/www/images/2019/05/27/1558960171336120.jpg"></a>
                <div class="caption">
                    <h4 style="word-wrap:break-word" class="ng-binding">第一个图片</h4>
                    <p style="word-wrap:break-word" class="ng-binding">用过的头像</p>
                    <p>
                        <span style="float:left"><input style="margin:0" type="checkbox" ng-model="checkone" ng-checked="master" ng-click="updateSelection($event,entity.photoId)" class="ng-pristine ng-valid"></span>
                        <span style="float:right;cursor: pointer" data-toggle="modal" data-target="#editModal" ng-click="findOne(entity.photoId)"><i class="fa fa-pencil-square-o"></i></span>
                    </p>
                </div>
            </div>
        </div><!-- end ngRepeat: entity in list --><div class="col-sm-6 col-md-2 col-xs-12  ng-scope"  >
            <div class="thumbnail">
                <a ng-href="http://119.29.130.199/www/images/2019/05/27/1558961679652651.jpg" href="http://119.29.130.199/www/images/2019/05/27/1558961679652651.jpg"><img style="height:200px;width:100%" ng-src="http://119.29.130.199/www/images/2019/05/27/1558961679652651.jpg" src="http://119.29.130.199/www/images/2019/05/27/1558961679652651.jpg"></a>
                <div class="caption">
                    <h4 style="word-wrap:break-word" class="ng-binding">手机上传</h4>
                    <p style="word-wrap:break-word" class="ng-binding">头像</p>
                    <p>
                        <span style="float:left"><input style="margin:0" type="checkbox" ng-model="checkone" ng-checked="master" ng-click="updateSelection($event,entity.photoId)" class="ng-pristine ng-valid"></span>
                        <span style="float:right;cursor: pointer" data-toggle="modal" data-target="#editModal" ng-click="findOne(entity.photoId)"><i class="fa fa-pencil-square-o"></i></span>
                    </p>
                </div>
            </div>
        </div><!-- end ngRepeat: entity in list -->
        </div>


        <!-- 分页 -->
        <tm-pagination conf="paginationConf"></tm-pagination>


    </div>
    <!-- 数据表格 /-->




</div>
<!-- /.box-body -->
<!-- 编辑窗口 -->
<div class="modal fade" id="addModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog" style="top:auto;">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                <h3 >相册上传</h3>
            </div>
            <div class="modal-body" >
                <table class="table table-bordered table-striped"  width="800px">
                    <!--<input type="hidden" name="createTime" ng-model="emtity.createTime" />-->
                    <tr>
                        <td>标题</td>
                        <td><input  class="form-control" placeholder="相册标题" ng-model="entity.photoTitle" >  </td>
                    </tr>
                    <tr>
                        <td>描述</td>
                        <td>
                            <input  class="form-control" placeholder="相册描述" ng-model="entity.photoExplain" >
                        </td>

                    </tr>
                    <tr>
                        <td>相册图片</td>
                        <td>
                            <button  class="btn btn-success onePicUpload"  placeholder="相册标题" >上传图片 </button>
                            <input type="hidden" name="photoImages" ng-model="entity.photoImages"/>
                        </td>
                    </tr>
                </table>
            </div>
            <div class="modal-footer">
                <button class="btn btn-success" data-dismiss="modal" aria-hidden="true" ng-click="add()">保存</button>
                <button class="btn btn-default" data-dismiss="modal" aria-hidden="true">关闭</button>
            </div>
        </div>
    </div>
</div>

<div class="modal fade" id="editModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog" style="width:auto;top:auto;">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                <h3 id="myModalLabel">相册编辑</h3>
            </div>
            <div class="modal-body" >
                <table class="table table-bordered table-striped"  width="800px">
                    <!--<input type="hidden" name="createTime" ng-model="emtity.createTime" />-->
                    <tr>
                        <td>标题</td>
                        <td><input  class="form-control" placeholder="博客标题" ng-model="entity.title" >  </td>
                    </tr>
                    <tr>
                        <td>内容</td>
                        <td>
                        </td>
                    </tr>
                </table>
            </div>
            <div class="modal-footer">
                <button class="btn btn-success" data-dismiss="modal" aria-hidden="true" ng-click="update()">保存</button>
                <button class="btn btn-default" data-dismiss="modal" aria-hidden="true">关闭</button>
            </div>
        </div>
    </div>
</div>


<div class="modal fade" id="delModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog" style="width:500px;top:35px;">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                <h3 >提示</h3>
            </div>
            <div class="modal-body"  >
                你真的要删除吗？
            </div>
            <div class="modal-footer">
                <button class="btn btn-default" data-dismiss="modal" aria-hidden="true" ng-click="delete()">确定</button>
                <button class="btn btn-default" data-dismiss="modal" aria-hidden="true">关闭</button>
            </div>
        </div>
    </div>
</div>
<script type="text/javascript" src="/plugins/baguetteBox/js/baguetteBox.min.js"></script>
<script type="text/javascript">
 //   baguetteBox.run('.tz-gallery');
</script>
</body>